package com.cr.business.domain.dto.app;

import com.cr.common.constant.RegConstants;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class RegDto {
    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegConstants.PHONE_NUMBER, message = "手机号格式有误！")
    private String phone;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = RegConstants.PASSWORD, message = "密码格式有误！")
    private String password;

    /**
     * 确认密码
     */
    @NotBlank(message = "确认密码不能为空")
    @Pattern(regexp = RegConstants.PASSWORD, message = "确认密码格式有误！")
    private String comfirmPassword;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 短信验证码
     */
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = RegConstants.CAPTCHA, message = "短信验证码格式有误！")
    private String code;

    /**
     * 短信验证码唯一标识
     */
    @NotBlank(message = "短信验证码唯一标识不能为空！")
    private String uuid;

}
